using System;
using System.Collections.Generic;
using Dict.DataModel;

namespace Dict.Dao
{
    public class TableUnionFightBaseCampDao:DaoBase<TableUnionFightBaseCamp>
    {
        public override void AddPrimaryIndex(TableUnionFightBaseCamp model)
        {
            cachePrimary[model.UFBId.ToString()] = model;
        }

        public override string GetFileName()
        {
            return "TableUnionFightBaseCamp.txt";
        }

        protected override TableUnionFightBaseCamp ParseRowData(string[] rowData)
        {
            TableUnionFightBaseCamp data = new TableUnionFightBaseCamp();

            if (string.IsNullOrEmpty(rowData[0]))
            {
                data.UFBId = 0;
            }
            else
            {
                data.UFBId = int.Parse(rowData[0]);
            }

            if (string.IsNullOrEmpty(rowData[1]))
            {
                data.UFId = 0;
            }
            else
            {
                data.UFId = int.Parse(rowData[1]);
            }
			data.Position = rowData [2];

            if (string.IsNullOrEmpty(rowData[3]))
            {
                data.Range = 0;
            }
            else
            {
                data.Range = double.Parse(rowData[3]);
            }

            if (string.IsNullOrEmpty(rowData[4]))
            {
                data.Camp = 0;
            }
            else
            {
                data.Camp = int.Parse(rowData[4]);
            }
			data.UFGuardId = rowData [5];
			data.CampUrl = rowData [6];
			data.DieEffectUrl = rowData [7];
			data.NormalEffectUrl = rowData [8];

            return data;
        }



    }

}
